package itsm.isperp.module.entity.app;

import itsm.isperp.framework.domain.BaseBean;
import itsm.isperp.framework.quartz.domain.JobDefinition;
import itsm.isperp.framework.quartz.domain.JobState;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 定时任务任务定义表，用于定义一个定时任务的信息，包括名称、组、运行的程序、运行时机等。
 * 
 * @author lizx
 * @date 2013-4-8
 */
@Entity
@Table(name = "app_job")
public class AppJob extends BaseBean implements JobDefinition {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column
	protected String name;

	@Column
	protected String beanId;

	@Column
	protected String cronExpression;

	@Column
	protected String status;

	@Column
	protected String description;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBeanId() {
		return beanId;
	}

	public void setBeanId(String beanId) {
		this.beanId = beanId;
	}

	public String getCronExpression() {
		return cronExpression;
	}

	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public void setStatus(JobState status) {
		this.status = status.toString();
	}

}
